﻿/*-----------------------------------------------
// File: ActorData.cs 
// Description: 战场中对象的数据 
// Author: Shaobing	492057342@qq.com
-----------------------------------------------*/
using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class ActorData {
    public string uniqueId;
    public string heroId;
    public int level;
    public int FPId;
    public double hp;
    public double maxHp;
    public List<SkillData> skillDatas;
    public List<BuffData> buffDatas;
    public string weaponId;
    

    public ActorData(ProtoBuf.Message.Actor data) {
        uniqueId = data.uid;
        heroId = data.heroId;
        level = data.level;
        FPId = data.FPId;
        hp = data.hp;
        maxHp = data.maxhp;
        this.weaponId = data.weaponId;
        skillDatas = new List<SkillData>();
        foreach (var skill in data.skills)
        {
            skillDatas.Add(new SkillData(skill));
        }
        buffDatas = new List<BuffData>();
        foreach (var buf in data.buffers) {
            buffDatas.Add(new BuffData(buf));
        }
    }
}
